package com.pda.xinma.adapter;

import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;

import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.pda.xinma.R;
import com.pda.xinma.bean.ExceptionsListBean;
import com.wangshen.base.ui.mvp.base.adapter.BaseAdapter;

import java.util.List;

public class ExceptionalAdapter extends BaseAdapter<ExceptionsListBean> {
    public ExceptionalAdapter(int layoutResId, @Nullable List<ExceptionsListBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ExceptionsListBean item) {
        super.convert(helper, item);
        helper.setText(R.id.tv_storageBin,item.getStorageBinId());
        RecyclerView recyclerView=helper.getView(R.id.rv_list);
        helper.setVisible(R.id.tv_warehouseName,false);
        InverntoryLogLIstAdapter inventoryAdapter = new InverntoryLogLIstAdapter(R.layout.item_inventory_log, item.getDetails());
        recyclerView.setAdapter(inventoryAdapter);
    }
}
